<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    //    与变量解构结合使用:
    //var person = {
    //    first: '小明',
    //    last: '小红'
    //}
    //const friend = ({ first, last }) => first + ' ' + last;
    //console.log(friend(person))

    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    //window.s2 = 10;
    //function Timer() {
    //    this.s1 = 0;
    //    this.s2 = 0;
    ////  箭头函数
    //    setInterval(() => this.s1++, 100);
    ////  普通函数
    //    setInterval(function () {
    //        this.s2++;
    //    }, 100);
    //}
    //var timer = new Timer();
    //console.log(timer);
    //setTimeout(() => console.log('s1: ', timer.s1), 310);// 3
    //setTimeout(() => console.log('s2: ', timer.s2),310);// 0
    //setTimeout(() => console.log('s2: ', window.s2), 310);// 13


    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// var  a=()=>{
////    setTimeout( console.log('你好'),2000)
//     var b=(va)=>{
//         console.log(va);
//     }
//     setInterval( b(123),2000 )
// }
// a()



    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


</script>
<body>

</body>
</html>